'use strict';

/**
 * Created by zhu on 14/12/18.
 */
var blog = angular.module('blog');

/**
 * 查询blog
 */
blog.factory('BlogListService', ['$resource', 'RootPathConstant', function ($resource, RootPathConstant) {
    return $resource(RootPathConstant + '/blog/author/:author?keyword=:keyword&countPerPage=:countPerPage&offset=:offset',
        {keyword: ''},
        {query: {method: 'GET', isArray: false}}
    );
}]);

/**
 * 查询目录下的blog
 */
blog.factory('BlogListByCategoryService', ['$resource', 'RootPathConstant', function ($resource, RootPathConstant) {
    return $resource(RootPathConstant + '/blog/category/:categoryId?countPerPage=:countPerPage&offset=:offset', {},
        {query: {method: 'GET', isArray: false}}
    );
}]);
